package com.architecture.core.web.vo;

import com.architecture.core.utils.ConfigUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>Project: BTC</p>
 * <p>Description: </p>
 * <p>Copyright (c) 2012 Wilmar Consultancy Services</p>
 * <p>All Rights Reserved.</p>
 *
 * @author <a href="mailto:hujianguang@wcs-global.com">胡建光</a>
 */
public class PageDataVO {

    //当前页面（确定）
    private int currentPage = 1;

    //总页数
    private int totalPage;

    //总数据（确定）
    private int totalData;

    //每页显示数据
    private int pageSize;

    //上一页
    private int prePage =1;

    //下一页
    private int nextPage=1;

    //页面索引显示的长度
    private int pageIndexSize;

    //当前显示页面索引的起始索引
    private int startPageIndex;

    //当前显示页面索引的结尾索引
    private int endPageIndex;

    //上一页的请求参数
    private String prePageQuery = new String();

    //下一页请求参数
    private String nextPageQuery = new String();

    //页面索引的请求地址
    private String url = new String();

    //页面索引的请求参数
    private List<String> queryList = new ArrayList<String>();

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public List<String> getQueryList() {
        return queryList;
    }

    public void setQueryList(List<String> queryList) {
        this.queryList = queryList;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public int getTotalData() {
        return totalData;
    }

    public void setTotalData(int totalData) {
        this.totalData = totalData;
    }

    public int getPageSize() {
        if (this.pageSize == 0) {
            this.pageSize = ConfigUtil.getInt(ConfigUtil.W_DEFAULT_PAGE_SIZE);
        }
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPrePage() {
        return prePage;
    }

    public void setPrePage(int prePage) {
        this.prePage = prePage;
    }

    public int getNextPage() {
        return nextPage;
    }

    public void setNextPage(int nextPage) {
        this.nextPage = nextPage;
    }

    public int getPageIndexSize() {
        if (this.pageIndexSize == 0) {
            this.pageIndexSize = ConfigUtil.getInt(ConfigUtil.W_DEFAULT_PAGE_INDEX_SIZE);
        }
        return pageIndexSize;
    }

    public void setPageIndexSize(int pageIndexSize) {
        this.pageIndexSize = pageIndexSize;
    }

    public String getPrePageQuery() {
        return prePageQuery;
    }

    public void setPrePageQuery(String prePageQuery) {
        this.prePageQuery = prePageQuery;
    }

    public String getNextPageQuery() {
        return nextPageQuery;
    }

    public void setNextPageQuery(String nextPageQuery) {
        this.nextPageQuery = nextPageQuery;
    }

    public int getEndPageIndex() {
        return endPageIndex;
    }

    public void setEndPageIndex(int endPageIndex) {
        this.endPageIndex = endPageIndex;
    }

    public int getStartPageIndex() {
        return startPageIndex;
    }

    public void setStartPageIndex(int startPageIndex) {
        this.startPageIndex = startPageIndex;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
